<?php

namespace aerovuelos\UbicacionBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class LocalidadesType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('provincias', null, array('required'=>true, 'attr' => array('class' => 'uniform')))
            ->add('nombre')
            ->add('sigla')
            ->add('codPostal')
            
        ;
    }

    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'aerovuelos\UbicacionBundle\Entity\Localidades'
        ));
    }

    public function getName()
    {
        return 'aerovuelos_ubicacionbundle_localidadestype';
    }
}
